<?php $this->load->view('admin/_header1') ?>
<script language="javascript" type="text/javascript" src="<?php echo site_url('js/formValidator_min.js')?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo site_url('js/formValidatorRegex.js')?>"></script>
<div class="Main">
	<?php
	echo form_open($doaction,array('id' => 'formregister'));
	?>
	<table width=854 style="margin:5px">
		
		<tr height=36>
			<td width=156 align="right" >*<?=lang("r_Username")?>:&nbsp;&nbsp;</td>
			<td width=200 ><?=$txuseraccount ?></td>
			<td width=420 ><div id="txuseraccountTip"></div></td>
		</tr>
		
		<tr height=36>
			<td width=156 align="right" >*<?=lang("r_Name")?>:&nbsp;&nbsp;</td>
			<td ><input type=text id="txusername" name="username" class="txd" value="<?=$username ?>" /></td>
			<td><div id="txusernameTip"></div></td>
		</tr>
		
		
		<tr height=36>
			<td width=156 align="right" ><?=lang("r_Birthday")?>:&nbsp;&nbsp;</td>
			<td ><input type=text id="txbirthday" name="birthday" class="txdatec" value="<?=$birthday ?>" /></td>
			<td ></td>
		</tr>
		
		<tr height=36>
			<td width=156 align="right" ><?=lang("r_Tel")?>:&nbsp;&nbsp;</td>
			<td ><input type=text id="txtel1" name="tel" class="txd" value="<?=$tel ?>" /></td>
			<td ><div id="txtel1Tip"></div></td>
		</tr>
		
		<tr height=36>
			<td width=156 align="right" ><?=lang("r_Mobile")?>:&nbsp;&nbsp;</td>
			<td ><input type=text  id="txmobilephone" name="mobilephone" class="txd" value="<?=$mobilephone ?>" /></td>
			<td ><div id="txmobilephoneTip"></div></td>
		</tr>
		
		<tr height=36>
			<td width=156 align="right" ><?=lang("r_Address")?>:&nbsp;&nbsp;</td>
			<td ><input type=text name="address" class="txd" value="<?=$address ?>" /></td>
			<td ></td>
		</tr>
		
		<tr height=36>
			<td width=156 align="right" >Email:&nbsp;&nbsp;</td>
			<td ><input type=text name="email" class="txd" value="<?=$email ?>" /></td>
			<td ></td>
		</tr>
		<tr height=36>
			<td></td>
			<td><input type="submit" name="bbb" id="ibtRegister" class="btn3" value="<?=$btnreg ?>" /></td>
			<td ></td>
		</tr>
		
	</table>
	<?php
	echo form_close();
	?>
	<script language="javascript">
	

	$('#txbirthday').datepick();
	$.formValidator.initConfig({formid:"formregister",onerror:function(msg){alert(msg)}});
	$("#txuseraccount").formValidator({onshow:"<?=lang('r_info1')?>",onfocus:"<?=lang('r_info2')?>",oncorrect:"该用户名可以注册"}).inputValidator({min:5,max:10,onerror:"你输入的用户名非法,请确认"}).regexValidator({regexp:"username",datatype:"enum",onerror:"用户名格式不正确"});
	$("#txuseraccount").ajaxValidator(
	{
		type: "GET",
		url: '<?php echo site_url('user/check_username')?>',
		datatype: "json",
		success:
			function(result)
			{
				return result.Result;
			},
		buttons: $("#ibtRegister"),
		onwait: "正在检测用户名是否重复...",
		onerror: "该用户名已被使用"
	});
	$("#txusername").formValidator({onshow:"请输入用户名",onfocus:"",oncorrect:""}).inputValidator({min:1,max:100,onerror:"你输入的用户名非法,请确认"});
	
	$("#txmobilephone").formValidator({empty:true,onshow:"请输入你的手机号码，可以为空哦",onfocus:"你要是输入了，必须输入正确",oncorrect:"谢谢你的合作",onempty:"你真的不想留手机号码啊？"}).inputValidator({min:11,max:11,onerror:"手机号码必须是11位的,请确认"}).regexValidator({regexp:"mobile",datatype:"enum",onerror:"你输入的手机号码格式不正确"});;
	$("#txtel1").formValidator({empty:true,onshow:"请输入你的联系电话，可以为空哦",onfocus:"格式例如：0577-88888888",oncorrect:"谢谢你的合作",onempty:"你真的不想留联系电话了吗？"}).regexValidator({regexp:"^[[0-9]{3}-|\[0-9]{4}-]?([0-9]{8}|[0-9]{7})?$",onerror:"你输入的联系电话格式不正确"});
	</script>
</div>

<?php $this->load->view('admin/_footer1') ?>